<template>
  <ant-modal
    modalWidth="576"
    modalHeight="500"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="产品" prop="productId">
            <a-input v-model="form.productId" placeholder="请输入产品"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="销售单" prop="orderId">
            <a-input v-model="form.orderId" placeholder="请输入销售单"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="数量" prop="number">
            <a-input-number v-model="form.number" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="单价" prop="price">
            <a-input-number v-model="form.price" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="单位" prop="unit">
            <a-input v-model="form.unit" placeholder="请输入单位"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="金额" prop="amount">
            <a-input-number v-model="form.amount" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="租户id" prop="tenantId">
            <a-input v-model="form.tenantId" placeholder="请输入租户id"/>
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
      <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
        保存
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizOrderProductAddForm from './BizOrderProductForm'
export default {
  ...BizOrderProductAddForm
}
</script>
